#pragma once

#include <string>

namespace xs
{

class Renderer;

class SpriteImpl: public Sprite
{
public:
					SpriteImpl(Renderer *_xse);
					~SpriteImpl();
		
	virtual bool	animate(const unsigned int &ms);
	virtual void	draw(const float &x, const float &y, f32 w, f32 h, const float &angle);
	virtual void	draw_mirrored(bool mv, bool mh, const float &x, const float &y, f32 w, f32 h, const float &angle);

	virtual void	set_frame_delay(const unsigned int &frame_delay);
	virtual void	set_blend(const Blend &blend);
	virtual void	set_source_rect(const Rect &rect);
	virtual void	set_color(const Color &color);
	virtual void	set_hot_spot(const pos2 &hot_spot);
	virtual void	set_texture(const Texture &texture);

	virtual u32		get_frame_delay();
	virtual Blend	get_blend();
	virtual Rect	get_source_rect();
	virtual Color	get_color();
	virtual pos2	get_hot_spot();
	virtual Texture	get_texture();

protected:
	Rect			source_rect;
	Quad			quad;
	pos2			hot_spot;
	float			tex_width, tex_height;
	Renderer*		xse;
	bool			m_dropped;
	u32				m_frame_delay;
};

}